<%= form_for(@document) do |f| %>
  <% if @document.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@document.errors.count, "error") %> prohibited this document from being saved:</h2>

      <ul>
      <% @document.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
	
  <div class="field">
    <%= f.label :isbn %><br />
    <%= f.text_field :isbn %>
  </div>
  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :author %><br />
    <%= f.text_field :author %>
  </div>
  <div class="field">
    <%= f.label :description %><br />
    <%= f.text_area :description %>
  </div>
  <div class="field">
    <%= f.label :number %><br />
    <%= f.number_field :number %>
  </div>
  <div class="field">
    <%= f.label :document_type %><br />
  	<%= f.select :document_type, Document::DOCUMENT_TYPES %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
